package com.gyg.client;

import com.gyg.returns.RespEntity;
import com.gyg.vo.param.TrashParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "cloudTrashClient", url = "${cloud.box.url}")
public interface CloudTrashClient {

    /**
     * 回收站列表
     * @param userId
     * @param pageNum
     * @param pageSize
     * @return
     */
    @GetMapping("/cloud-trash/list")
    RespEntity cloudTrashList(@RequestParam(value = "userId", required = true) Integer userId,
                              @RequestParam(value = "pageNum", required = true) Integer pageNum,
                              @RequestParam(value = "pageSize", required = true) Integer pageSize);

    /**
     * 恢复
     * @param trashParam
     * @return
     */
    @PutMapping("/cloud-trash/recover")
    RespEntity recoverTrash(@RequestBody TrashParam trashParam);

    /**
     * 彻底删除
     * @param trashParam
     * @return
     */
    @DeleteMapping("/cloud-trash/delete")
    RespEntity deleteTrash(@RequestBody TrashParam trashParam);

}
